import request from '@/utils/request'

/**
 * 获取列表
 */
export function dataList(param, pageSize, pageNo) {
  const data = {
    pageNo,
    pageSize,
    param: {
      ...param
    }
  }
  return request.post('/sq/jgzczd/page', data)
}
/**
 * 删除
 * @param {*} id
 */
export function deleteData(id) {
  return request.delete(`/sq/jgzczd/del/${id}`)
}

// 生成申请单号
export function getCode() {
  return request.get('/sq/jgzczd/getCode')
}

//编辑详情
export function details(id) {
  return request.get('/sq/jgzczd/detail/' + id)
}

/**
 * 新增
 * @param {*} options
 */
export function addData(options) {
  return request.post('/sq/jgzczd/save', options)
}

/**
 * 编辑
 * @param {*} options
 */
export function updateData(options) {
  return request.put('/sq/jgzczd/save', options)
}

//审批
export function sp(options) {
  return request.post('/sq/jgzczd/sp', options)
}
/**
 * 审核统一
 * @param {*} data
 */
export function auditIsOk(data) {
  return request.post('/sq/audit/auditSp', data)
}
